<!--
 * @Author: 邹涵 zouh@wizpower.com
 * @Date: 2024-06-17 09:09:47
 * @LastEditors: 邹涵 zouh@wizpower.com
 * @LastEditTime: 2024-06-26 14:44:41
 * @FilePath: \zj_front\src\views\UsageAnalysis\index.vue
 * @Description: 
-->
<template>
  <div class="wrap">
    <!-- 表格 -->
    <div>
      <div class="allDIV" style="height: auto; display: none">
        <el-form
          :inline="true"
          :model="form"
          class="demo-form-inline"
          style="margin-left: 1%"
        >
          <el-form-item label="日期选择:">
            <el-date-picker
              v-model="form.queryTime"
              type="month"
              placeholder="选择月"
              size="mini"
            >
            </el-date-picker>
          </el-form-item>
          <el-form-item label="所属变电站:">
            <el-select
              v-model="form.stationId"
              placeholder="请选择"
              size="mini"
              @change="choose()"
            >
              <el-option
                v-for="item in stationOptions"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              >
              </el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="所属馈线:">
            <el-select v-model="form.feederId" placeholder="请选择" size="mini">
              <el-option
                v-for="item in lineOptions"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              >
              </el-option>
            </el-select>
          </el-form-item>
          <el-form-item>
            <el-button
              style="background: #017e81; color: #fff"
              @click="submitForm('form')"
              size="mini"
            >
              查询
            </el-button>
            <el-button @click="resetForm('form')" size="mini">重置</el-button>
          </el-form-item>
        </el-form>
      </div>

      <div style="" class="allDIV">
        <TitleLook :title="'指标统计'"> </TitleLook>

        <div class="underTitle">
          <div
            v-for="item in titleData"
            :key="item.index"
            style="
              display: flex;
              flex-direction: row;
              align-items: center;
              font-weight: bold;
              font-size: 20px;
            "
          >
            <el-image
              style="width: 40px; height: 40px; position: relative; right: 5%"
              :src="item.src"
              fit="fill"
            ></el-image>

            <span>{{ item.name }}</span>
            <span>{{ item.total }}</span>
            <span>{{ item.dw }}</span>
          </div>
        </div>
      </div>

      <div>
        <div style="width: 49.7%; height: 100%" class="allDIV">
          <TitleLook :title="'储能利用率监测'"> </TitleLook>

          <div style="width: 100%; height: 90%; display: flex">
            <div
              id="tafvr1"
              style="width: 100%; height: 100%"
              ref="tafvr1"
            ></div>
          </div>
        </div>
        <div style="width: 49.7%; height: 100%" class="allDIV">
          <TitleLook :title="'储能运行监测'"> </TitleLook>

          <div
            style="
              width: 100%;
              height: 90%;
              display: flex;
              flex-direction: column;
              padding-bottom: 2%;
            "
          >
            <div
              id="tafvr2"
              style="width: 100%; height: 100%"
              ref="tafvr2"
            ></div>
          </div>
        </div>
      </div>

      <div style="height: 45%" class="allDIV">
        <TitleLook title="储能明细列表"> </TitleLook>

        <div class="underTitle" style="height: 80%">
          <CleanForm
            :showColumnHandle="false"
            :api="queryTable"
            :outLoad="true"
            :queryParam="form"
            :fieldList="headList"
            :tableOptionWidth="200"
            :showColumnSetting="false"
            :page="false"
            :dialogPage="true"
            :showExportBtn="false"
            :showCheckbox="false"
            ref="windPowerTable"
            size="mini"
            searShow="false"
          >
          </CleanForm>
        </div>
      </div>

      <detail
        :dialog-visible.sync="dialogVisible"
        @closeDialog="dialogVisible = false"
        ref="detail"
        :title="detailTitle"
        :typeStr="tableStr"
      ></detail>
    </div>
  </div>
</template>
<script>
import TestResult from "./index.js";
export default TestResult;
</script>
<style lang="scss" scoped>
::v-deep .el-tree {
  height: 100% !important;
  overflow-x: auto !important;
}

::v-deep .el-card__body {
  height: calc(95% - 20px) !important;
}

::v-deep .el-tree-node:focus > .el-tree-node__content {
  background-color: #f2f2f2;
}

.table-html-wrap {
  overflow: hidden;
  overflow-y: auto;
}

.table-html-wrap ::v-deep table {
  // color: red;
  border-right: 1px solid #000;
  border-bottom: 1px solid #000;
  border-collapse: collapse;
  margin: auto;
}

.table-html-wrap ::v-deep table td {
  border-left: 1px solid #000;
  border-top: 1px solid #000;
  white-space: nowrap;
  text-align: center;
  padding: 0.5rem;
}

.table-html-wrap ::v-deep tbody tr:nth-of-type(1) {
  font-weight: bold;
  font-size: 20px;
}

.dialog-footer {
  text-align: end;
}

.wrap {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: row;

  > div:nth-child(1) {
    width: 100%;
    height: auto;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;

    > div:nth-child(1) {
      width: 100%;
      height: 6%;
      margin-bottom: 10px;
    }

    > div:nth-child(2) {
      width: 100%;
      height: 15%;
      margin-bottom: 10px;
      display: flex;
      flex-direction: column;
      justify-content: space-around;
    }

    > div:nth-child(3) {
      width: 100%;
      height: 40%;
      display: flex;
      flex-direction: row;
      justify-content: space-between;
    }

    > div:nth-child(4) {
      width: 100%;
      height: 40%;
      margin-top: 10px;
    }
  }

  /* background-color: rgb(195, 188, 241); */
}

.title {
  border: 1px solid grey;
  border-radius: 4px;
  width: 200px;
  text-align: center;
}

.operateButton {
  cursor: pointer;
  font-size: 12px !important;
  padding: 8px;

  img {
    transform: translateY(-2px);
  }
}

.operateButton::after {
  display: inline-block;
  content: "";
  width: 1px;
  height: 18px;
  margin: 0 3px;
  transform: translate(6px, 3px);
  background: #000;
}

.operateButton:last-child::after {
  display: none;
}

::v-deep .el-select--mini {
  width: 100%;
}

::v-deep .el-date-editor {
  width: 100%;
}

::v-deep .el-scrollbar__thumb {
  background: #000;
  display: none;
}

// ::-webkit-scrollbar-thumb {
//   // display: none;
// }
::v-deep .el-table__empty-block {
  justify-content: left;
  text-align: left;
  padding-left: 40%;
}

::v-deep .el-select-dropdown {
  position: absolute !important;
  top: 80% !important;
  left: 0px !important;
}

::v-deep .el-card {
  border-radius: 4px;
  border: 1px solid #ebeef5;
  background-color: #fff;
  overflow: visible !important; //溢出不隐藏   隐藏的话，下拉框看不到全部数据
  color: #303133;
  transition: 0.3s;
  height: 100%;
}

.allDIV {
  border-radius: 4px;
  border: 1px solid #ebeef5;
  background-color: #fff;
  overflow: visible !important; //溢出不隐藏   隐藏的话，下拉框看不到全部数据
  color: #303133;
  transition: 0.3s;
  height: 100%;
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
}

.underTitle {
  width: 100%;
  height: 90%;
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  align-content: center;
}

.child_right {
  // @include child_left;
  width: 100%;
  height: 50%;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: baseline;
  // margin-top: 20%;
}

.left_text1 {
  display: flex;
  justify-content: center;
  text-align: center;
  align-content: center;
  vertical-align: middle;
  /* 垂直居中 */
  font-family: Source Han Sans CN;
  font-weight: bold;
  // font-size: 40px;
  color: #ffffff;
  background: linear-gradient(to bottom, #ffffff 0%, #8dc9ec 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.zerostyle {
  width: 20%;
  height: 100%;
  color: aliceblue;
  justify-content: space-around;
  display: flex;
  flex-direction: column;
  > div:nth-child(n) {
    background: linear-gradient(to top, rgb(76, 197, 176), rgb(119, 217, 230));

    border-radius: 5px;
    width: 90%;
    height: 20%;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
  }
}

.right_bottom {
  width: 100%;
  height: 30%;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  align-content: space-around;
  > div:nth-child(n) {
    width: 49%;
    height: 35%;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-content: center;
    > div:nth-child(n) {
      display: flex;
      flex-direction: column;
      width: 100%;
      justify-content: space-around;
      background: linear-gradient(
        to top,
        rgb(76, 197, 176),
        rgb(146, 218, 143)
      );
      width: 60%;
      border-radius: 10px;
      color: #fff;
      align-content: center;
    }
  }
}

:deep .el-form-item {
  margin-bottom: 0 !important;
}
</style>
